POV-Ray : Newsgroups : povray.general : How match pigment, with color_maps, with normal ? can be done? : Re: How match pigment, with color_maps, with normal ? can be done? Server Time
1 Aug 2024 06:18:23 EDT (-0400)
  Re: How match pigment, with color_maps, with normal ? can be done?  
From: Jim Charter
Date: 29 Jan 2006 23:56:30
Message: <43dd9c7e$1@news.povray.org>
RCRuiz wrote:
> Jim Charter and Alain, thanks a ton :D I'm new on Pov your respond help me a
> lot
> 
> Than you again
> 
> Un Saludo
> 
> 
> 
> 
You are welcome.  Note that I gave you the "natural" sdl syntax to 
answer your specific question.

Many prefer and commonly use a more "general" solution based on sdl's 
support for functions.  You first declare the pigment as a function then 
use the function in both the pigment and normal definitions

#declare Fn_MyBozo =
         function {
                 pigment {
                         bozo
                         pigment_map {
                                 [.3 rgb 0 ]
                                 [.35 rgb 1 ]
                         }
                 }
         };

         plane { y, 0

                 pigment {
                         function { Fn_MyBozo (x,y,z).gray }
                         pigment_map {
                                 [0 rgb (<0,0,1>+<5,5,5>)/6  ]
                                 [1 rgb 1 ]
                         }
                 }
                 normal {
                         function { Fn_MyBozo (x,y,z).gray }
                 }

         }


This is a very powerful and flexible way to work.  A very clear 
treatment of this beside the docs can be found on Mike Williams' site:

http://www.econym.demon.co.uk/

under the isosurface tutorial


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.